package org.or5e.oss.core.api.bm;

import java.io.File;
import java.io.Serializable;
import java.util.HashMap;

import org.or5e.oss.core.api.bm.server.SMTPServer;

public class BulkMailConfig implements Serializable{

	private static final long serialVersionUID = 2503040947136115815L;

	private File dataFile;
	private File mailFile;
	private HashMap<ATTRIB_KEY, Object> attributes = new HashMap<ATTRIB_KEY, Object>();
	public enum ATTRIB_KEY {GOODFILE, BADFILE, MAILFILE, GOODEMAILCNT, BADEMAILCNT};
	private final SMTPServer server;

	public BulkMailConfig(String dataFile, String mailFile, SMTPServer server) {
		this(new File(dataFile), new File(mailFile), server);
	}

	public BulkMailConfig(File dataFile, File mailFile, SMTPServer server) {
		this.dataFile = dataFile;
		this.mailFile = mailFile;
		this.server = server;
	}

	public final File getDataFile() {
		return dataFile;
	}

	public final File getMailFile() {
		return mailFile;
	}

	public final SMTPServer getSMTPServer() {
		return this.server;
	}

	public final Object getAttribute(ATTRIB_KEY key) {
		return this.attributes.get(key);
	}

	public final void setAttribute(ATTRIB_KEY key, Object value) {
		this.attributes.put(key, value);
	}
}